﻿#region 命名空间

using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sharp.Domain.PlatformBoundedContext.UserModule.Aggregates;

#endregion

namespace Sharp.Domain.PlatformBoundedContext.ModelConfigurations
{
    /// <summary>
    ///     Represents the entity type configuration for the <see cref="UserProfile" /> entity.
    /// </summary>
    public partial class UserProfileConfiguration : EntityTypeConfiguration<UserProfile>
    {
        #region 构造函数
        /// <summary>
        /// 
        /// </summary>
        public UserProfileConfiguration()
        {
            HasKey(c => c.Id);
           
            Property(c => c.Id)
                .IsRequired()
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
 
            this.HasRequired(t => t.User).WithRequiredPrincipal().WillCascadeOnDelete(false);
        }

        #endregion
    }
}